One method for migrating file systems involves copying files and directories to a migration destination volume. In the following description, if not specifically distinguished, files and directories are collectively referred to as objects.
At this time, a method utilizing a thin provisioning function is adopted so that migration can be performed even if there is only little free space in the storage subsystem, and this method includes the following procedure. An object is copied from a migration source volume to a migration destination volume. At this time, an allocation unit (which is a page) of the thin provisioning function is allocated to the migration destination volume when needed. Thereafter, the copied object is deleted from the migration source volume. At this time, the pages not being used out of the pages allocated to the migration source volume are released as needed from the migration source volume. This arrangement enables to suppress the increase of used capacity of the storage.
However, a page cannot be released unless all the objects within the page have been copied. Therefore, there may be cases where a small number of non-copied objects remain in pages, so that the pages cannot be released immediately. In order to enable migration even if there is only a small free capacity in the storage subsystem, it is necessary to release pages as quickly as possible and suppress increase of capacity utilization of the storage.
Therefore, it is effective to apply a defragmentation technique as disclosed in patent literature 1 prior to migrating the file system. A defragmentation technique is a technique for solving the state where blocks constituting a single object are dispersed within the storage system, and locating the blocks in successive areas. According to this defragmentation technique, successive areas become free spaces when a single file is deleted, so that a large free space can be created within a page and the page can be released promptly.
Further, patent literature 2 teaches an art of sorting objects at a start position of object data within the storage and performing backup of the objects. Similar to patent literature 2, the retention of file data within pages can be suppressed by determining the order for copying files to start with files having start positions within the same page.